# Maintainer: AndyRTR <andyrtr@archlinux.org>

pkgname=liblangtag
pkgver=0.6.5
pkgrel=1
pkgdesc="interface library to access/deal with tags for identifying languages"
arch=('loong64' 'x86_64')
url="https://bitbucket.org/tagoh/liblangtag/wiki/Home"
license=('LGPL3' 'MPL') # actually MPL2.0
depends=('libxml2' 'glib2' 'glibc')
makedepends=('gobject-introspection')
optdepends=('gobject-introspection-runtime: use with liblangtag-gobject')
source=(https://bitbucket.org/tagoh/liblangtag/downloads/$pkgname-$pkgver.tar.bz2)
sha256sums=('c40e12636482bfc34cf2b3d8ce916c8307a9352c4954497be8792b9e81fa1bf1')

build() {
  cd "$pkgname-$pkgver"
  ./configure --prefix=/usr
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

check() {
  cd "$pkgname-$pkgver"
  make check
}

package() {
  cd "$pkgname-$pkgver"
  make DESTDIR="$pkgdir/" install
}
